import { default as request, cloud } from '@/framework/utils/request'

/**
 * 分页查询监控信息所有数据
 */
export function getPage(params) {
  return request({
    url: `${cloud.videofusion}/videoMonitorInfo/page`,
    method: 'get',
    params
  })
}

/**
 * 修改监控信息数据
 */
export function editVideoMonitor(data) {
  return request({
    url: `${cloud.videofusion}/videoMonitorInfo/edit`,
    method: 'post',
    data
  })
}

/**
 * 新增监控信息数据
 */
export function addVideoMonitor(data) {
  return request({
    url: `${cloud.videofusion}/videoMonitorInfo/add`,
    method: 'post',
    data
  })
}

/**
 * 删除监控信息数据
 */
export function delVideoMonitor(data) {
  return request({
    url: `${cloud.videofusion}/videoMonitorInfo/delete`,
    method: 'post',
    data
  })
}

/**
 * 根据监控信息id统计该监控在几个监控分组下
 */
export function countByMonitor(id) {
  return request({
    url: `${cloud.videofusion}/videoGroupMonitor/countByMonitorId`,
    method: 'post',
    data: {
      monitorId: id
    }
  })
}

